﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ScriptManagerDemo.aspx.cs" Inherits="OnlineManagement.Web.ScriptManagerDemo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script type="text/javascript" language="javascript">
        $(document).ready(function () {
            $("#btn2").click(function () {
                __doPostBack('a2', '');
            });
        });
      
    </script>
</head>
<body>
    <form id="form1" runat="server">

    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true">
    </asp:ScriptManager>
    <a id="aLink" runat="server" href="javascript:void(0);">Tab 1</a>
    <a id="a2" runat="server" href="javascript:void(0);">Tab 2</a>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
    <ContentTemplate>
        <asp:Label runat="server" ID="lb1"></asp:Label>
        <asp:CheckBox ID="cb1" runat="server" AutoPostBack="true" />OK?

    </ContentTemplate>
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="aLink" EventName="ServerClick" />
    </Triggers>
    </asp:UpdatePanel>
    
    <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
        <asp:Label runat="server" ID="lb2"></asp:Label>
    </ContentTemplate>
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="a2" EventName="ServerClick" />
    </Triggers>
    </asp:UpdatePanel>

    <input  type="button" id="btn2" value="Fresh Update Panel"/>
    </form>
</body>
</html>
